using System;
using L=Science.Physics.GeneralPhysics;

namespace Serway.Chapter40
{
	/// <summary>
	/// Example03: The Photoelectric Effect for Sodium
	/// A sodium surface is illuminated with light having a 
	/// wavelength of 30 nm. The work function for sodium metal 
	/// is 2.46 eV. Find
	/// (A) 
	/// the maximum kinetic energy of the ejected photoelectrons and
	/// (B) 
	/// the cutoff wavelength for sodium.
	/// </summary>
	public class Example03
	{
		public Example03()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
			L.Frequency f = new L.Frequency();
			f.Hz = L.Constant.SpeedOfLightInVacuum/300.0E-9;
			L.Work phi = new L.Work();
			phi.J = 2.46*L.Constant.ElementaryCharge;
			L.KineticEnergy K = L.QuantumPhysics.
				MaximumKineticEnergyInPhotoelectricEffect(f,phi);
			result+=Convert.ToString(K.J/L.Constant.ElementaryCharge);
		}
	}
}
